﻿Imports System.IO

Public Class Form4

    Private Sub Form4_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
        Form1.WindowState = FormWindowState.Normal
    End Sub

    Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If System.IO.Directory.Exists(Application.StartupPath & "\target") Then
            Dim directoryInfo As DirectoryInfo = New DirectoryInfo(Application.StartupPath & "\target")
            Dim directories As DirectoryInfo() = directoryInfo.GetDirectories()
            For i As Integer = 0 To directories.Length - 1
                If 0 <= directories(i).Name.IndexOf("mc_") Then
                    Dim fdn As String = directories(i).Name.Replace("mc_", "")
                    ComboBox1.Items.Add(fdn)
                ElseIf 0 <= directories(i).Name.IndexOf("ftb_") Then
                    ComboBox1.Items.Add(directories(i))
                End If
            Next
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Form5.ShowDialog()
    End Sub
End Class